<#import "/admin/common/tree.html" as tree>
<#import "/admin/common/upload.html" as upload>
<#escape x as (x)!"">
<div class="page-dialog-content">
    <div class="panel-dialog">
		<form id="infoSaveForm" action="save" method="post" class="form-horizontal form-dialog-horizontal">
			<input type="hidden" name="id" value="${info.id}"/>
			<div class="panel-dialog-body">
				<div class="form-group">
					<label class="col-sm-3 control-label"><span class="required" aria-required="true">*</span>所属部门：</label>
                    <div class="col-sm-6">
                    	<@tree.treeSelect treeUrl="/admin/sys/dept/selectTree">
                    	<input type="hidden" class="tree-id" name="deptCode" value="${info.deptCode!0}"/>
                   		<input type="text" class="tree-name tree-operate form-control required" value="${deptName!}" readonly="readonly" placeholder="请选择所属部门"/>
                    	</@tree.treeSelect>
                    </div>
	            </div>
				<div class="form-group">
                    <label class="col-sm-3 control-label"><span class="required" aria-required="true">*</span>登录名：</label>
                    <div class="col-sm-6">
                    	<input type="text" name="loginName" value="${info.loginName}" class="form-control required" maxlength="20" placeholder="请输入登录名"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label"><span class="required" aria-required="true">*</span>姓名：</label>
                    <div class="col-sm-6">
                    	<input type="text" name="userName" value="${info.userName}" class="form-control required" maxlength="20" placeholder="请输入姓名"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label"><span class="required" aria-required="true">*</span>手机号：</label>
                    <div class="col-sm-6">
                    	<input type="text" name="mobile" value="${info.mobile}" class="form-control required mobile" maxlength="20" placeholder="请输入手机号"/>
                    </div>
                </div>
                <#if !info?? >
                <div class="form-group">
                    <label class="col-sm-3 control-label"><span class="required" aria-required="true">*</span>密码：</label>
                    <div class="col-sm-6">
                    	<input type="password" name="password" value="" id="password" class="form-control required" maxlength="20" placeholder="请输入您的密码"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label"><span class="required" aria-required="true">*</span>确认密码：</label>
                    <div class="col-sm-6">
                    	<input type="password" name="passagain" value="" id="passagain" class="form-control required" maxlength="20" placeholder="请再次输入您的密码"/>
                    </div>
                </div>
                </#if>
                <div class="form-group">
                    <label class="col-sm-3 control-label">职位：</label>
                    <div class="col-sm-6">
                    	<input type="text" name="position" value="${info.position}" class="form-control" maxlength="20" placeholder="请输入职位"/>
                    </div>
                </div>
                <div class="form-group">
		            <span class="col-sm-3 control-label">头像：</span>
		            <div class="col-sm-6">
		                <div class="action-pic-show clear">
		                    <div class="action-pic-lis">
		                        <dl>
		                            <dd>
		                                <@upload.uploadImg name="logo" value=(info.logo)! />
		                            </dd>
<!-- 		                            <dd> -->
<!-- 		                                <p class="clearfix"> -->
<!-- 		                                    (宽*高)建议用最大值来做，如最大值的图片太大，就用标准值来做。<br /> 标准值：128px*128px <br /> 图片类型：jpg、jpeg、png -->
<!-- 		                                </p> -->
<!-- 		                            </dd> -->
		                        </dl>
		                    </div>
		                </div>
		            </div>
		        </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">备注：</label>
                    <div class="col-sm-6">
						<textarea id="remarks" name="remarks" rows="3" cols="" maxlength="100" class="form-control " placeholder="请输入备注信息">${info.remarks}</textarea>
                    </div>
                </div>
			</div>
			
			<div class="panel-footer panel-dialog-footer">
				<div class="text-right">
					<button id="dialog-btn-save" type="submit" class="btn btn-primary">保存</button>
					<button type="button" onclick="layer.closeAll();" class="btn btn-default">取消</button>
				</div>
			</div>
		</form>
	</div>
</div>
<script type="text/javascript">
	$(function(){
		frm.submit("dialog", "infoSaveForm", "", {
			passagain : {
			      equalTo: "#password"
		    }
		});
	});
</script>
</#escape>
